Modules

Python comes with a library of standard modules.

https://docs.python.org/3/library/


In [ ]:
# Import all methods
import json 
data_file = open('../data/workfile.json')
data = json.load(data_file)

print(data)

In [ ]:
# Import a specific method
from os import path
print (path.basename('../data/workfile.json'))

In [ ]:
# Alias modules
import numpy
print (numpy.__version__)
import numpy as np # Alias module
print (np.__version__)

Anaconda packages

Anaconda has many hundreds of supported packages.

There are slightly more packages for Python 2.7 than 3.6 and again more supported packages on Linux and MacOS than Windows. If the target platform is different to the development platform it is wise to check support for libraries being used.

https://docs.continuum.io/anaconda/pkg-docs